﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AiXiu.Model;
using AiXiu.Common;
using AiXiu.IDAL;

namespace AiXiu.IBLL
{
    /// <summary>
    /// 登录业务逻辑接口
    /// </summary>
    public interface ILoginAndRegisterBLL
    {
        /// <summary>
        /// 登录信息验证，通过账号登录
        /// </summary>
        /// <param name="UserName">用户名</param>
        /// <param name="Password">密码</param>
        /// <returns>登录结果</returns>
        OperResult<TBUsers> loginByUserName(string userName, string password);

        /// <summary>
        /// 登录信息验证，通过手机号登录
        /// </summary>
        /// <param name="mobileNumber">手机号</param>
        /// <param name="password">密码</param>
        /// <returns>登录结果</returns>
        OperResult<TBUsers> loginByMobileNumber(string mobileNumber, string password);

        /// <summary>
        /// 注册信息验证
        /// </summary>
        /// <param name="reg">注册信息</param>
        /// <returns>注册的用户</returns>
        OperResult<TBUsers> register(TBLogins reg);

        /// <summary>
        /// 通过Id获取到登录信息
        /// </summary>
        /// <param name="id">查找信息的id</param>
        /// <returns>查找到的信息</returns>
        OperResult<TBLogins> getLoginById(int id);
    }
}
